﻿/* *****************************************************************************
 * @ Encoding: UTF-8
 * @ File Name: naughty_differential_node_num.cpp
 * @ Author: carl
 * @ Email: naughtygeng@qq.com
 * @ Created Time: 2022-7月-06(星期三) 21:23:42
 * @ All Rights Reserved
 * *****************************************************************************/

#include "naughty_differential_node_num.hpp"

namespace naughty_differential
{

node_num::node_num(double number)
	:
        node_base({}),
		m_number(number)
{
	
}

std::shared_ptr< node_base> node_num::differential(std::string variable)
{
	std::shared_ptr< node_base> node_ptr = std::make_shared< node_num>(0);

	return node_ptr;
}

enum node_type node_num::get_node_type()
{
	return node_type_num;
}

std::string node_num::serialize()
{
    return {};
}

std::string node_num::to_string() const
{
    return std::to_string(m_number);
}

std::shared_ptr<node_base> node_num::clone()
{
    return std::make_shared<node_num>(m_number);
}

double node_num::get_value(std::map<std::string, double> val_value_map)
{
    return m_number;
}

std::string node_num::identity_string() const
{
    return std::to_string(m_number);
}

}
